package com.baidu.Chapter02;

import java.util.Scanner;

public class ex2_11 {
    public static void main(String[] args) {
        long sec = 365*24*60*60,newPeople=312032486;
        System.out.print("Enter the number of years：");
        Scanner sc=new Scanner(System.in);
        double years=sc.nextDouble();
        for (int i = 1; i <= years-1; i++) {
            newPeople = newPeople + sec/7 - sec/13 + sec/45;
        }
        System.out.println("The population in "+years+" years is "+newPeople);
    }
}
